#include "KVConfig/KVConfig.h"
#include <iostream>
using namespace KVConfig;
using namespace std;

int main()
{
    Reader::selfTest();

    Data data;
    Reader reader;
    reader.parseFile("main.cfg", data);
    cout << data["NAME"] << endl;
    cout << data["AGE"] << endl;
    int i = 0;
    data.get("INT", i);
    cout << "i:" << i << endl;
    double d = 0.0;
    data.get("DOUBLE", d);
    cout << "d:" << d << endl;
    long long ll = 0;
    data.get("LONGLONG", ll);
    cout << "ll:" << ll << endl;
    string s;
    data.get("STRING", s);
    cout << "s:" << s << endl;
    bool b = false;
    data.get("BOOL", b);
    cout << "b:" << b << endl;
    return 0;
}
